<script>
    //三元运算：var 变量 = 表达式 ? 值1 : 值2
    let x1 = 8 % 2 === 0 ? true : false
    console.log(x1);    //true

    let x2 = 9 % 2 === 0 ? 0 : 1
    console.log(x2);    //1
    
</script>